From: Andrea Azzarone Date: Thu, 4 Oct 2018 13:05:44 +0000 (+0100) Subject: viewSelector: Don't unfocus other modals on reset X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fffe58f829d027e1861f229ab3bf367a5f7764e5;p=gnome-shell.git viewSelector: Don't unfocus other modals on reset Don't drop the key focus on Clutter's side if anything but the overview has pushed a modal (e.g. system modals when activated using the overview). Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/618 --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index c650886d2..6a235eccd 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -460,7 +460,11 @@ var ViewSelector = new Lang.Class({ }, reset() { - global.stage.set_key_focus(null); + // Don't drop the key focus on Clutter's side if anything but the + // overview has pushed a modal (e.g. system modals when activated using + // the overview). + if (Main.modalCount <= 1) + global.stage.set_key_focus(null); this._entry.text = '';